﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StoreTransport.DAO;

namespace StoreTransport.Data {
    class StoreCenterData {
        public Dictionary<int, ProductKindData> DicProductKindData { get; set; }

        public StoreCenterData() {
            DicProductKindData = new Dictionary<int, ProductKindData>();
        }

        public List<ProductData> GetPriorityList(int ProductKindId) {
            if (!DicProductKindData.ContainsKey(ProductKindId)) {
                return new List<ProductData>();
            }
            return DicProductKindData[ProductKindId].DicProducts.Values.OrderBy(ro => ro.ComputedInventory).ToList();
        }
    }
}
